package com.eastfair.venuebooking.api;

import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.ServiceOrderDTO;
import com.eastfair.venueservice.vo.ServiceOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 主场，搭建商 服务订单 feign.
 *
 * @author dqq
 * @date 2022 /11/11
 */
@FeignClient("venue-services-manage/homeServiceOrder")
public interface HomeServiceOrderFeign {

    /**
     * 展商ID查询保证金订单
     *
     * @param exhibitorIdList the exhibitor id list
     * @return the r
     */
    @PostMapping("/query/manageOrder/exhibitorId")
    R<List<ServiceOrderVO>> queryManageOrderByExhibitorIdList(@RequestBody List<Long> exhibitorIdList);

    /**
     * 展商展位ID查询订单列表.
     *
     * @param exhibitorId the exhibitor id
     * @return the r
     */
    @GetMapping("/query/order/exhibitorId/{exhibitorId}")
    R<List<ServiceOrderVO>> queryOrderByExhibitorId(@PathVariable("exhibitorId") Long exhibitorId);

    /**
     * 支付订单.
     *
     * @param serviceOrderDTO the service order dto
     * @return the r
     */
    @PostMapping("/pay")
    R<Boolean> payServiceOrder(@RequestBody ServiceOrderDTO serviceOrderDTO);
}